/*
 * @version: 
 * @Author: yu
 * @Date: 2023-07-17 10:29:51
 * @LastEditors: Andy
 * @LastEditTime: 2023-07-17 17:58:22
 */
import { lazy, Suspense } from 'react'
import { Routes, Route, Navigate } from 'react-router-dom'
const Login = lazy(() => import('./pages/login'))
const Index = lazy(() => import('./pages/index'))
export default function App() {
    return (
        <>
            <Suspense fallback={<h2>正在加载中...请稍等</h2>}>
                <Routes>
                    <Route path='/login' element={<Login></Login>}></Route>
                    <Route path='/index/*' element={<Index></Index>}></Route>
                    <Route path='/' element={<Navigate to='/login'></Navigate>}></Route>
                </Routes>
            </Suspense>
        </>
    )
}
